<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>打印</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../lib/layui/css/layui.css">
    <link rel="stylesheet" href="../../css/common.css">
    <style>
        .ok-body {
            padding: 20px;
        }

        blockquote {
            font-size: 16px;
        }
        .b1 {
            border: 1px solid #EAEBF0;
        }
        .layui-card-header {
            font-size: 16px;
        }
        .layui-card-body {
            font-size: 20px;
        }
    </style>
</head>
<body class="ok-body-scroll">
<div class="ok-body">
    <blockquote class="layui-elem-quote">
        <p>打印 okPrint</p>
        <p>1. 创建对象</p>
        <p>2. 调用对象的start方法执行</p>
    </blockquote>
    <pre lay-title="JavaScript">
layui.use(['code', 'jquery', 'jqprint'], function () {
    var $ = layui.jquery,
        code = layui.code;

    $('#btnPrint').click(function (){
        $('#content').jqprint();
    });
});
   </pre>
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md3">
            <div class="layui-card b1">
                <div class="layui-card-header">最简单的例子</div>
                <div class="layui-card-body">
                    <div id="content">asdfasdfadsf</div>
                    <div id="btnPrint" class="layui-btn layui-btn-primary">打印</div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
<script src="../../lib/layui/layui.js"></script>
<script type="text/javascript">
	layui.use(['code', 'jquery', 'jqprint'], function () {
		var $ = layui.jquery,
			code = layui.code;

        $('#btnPrint').click(function (){
	        $('#content').jqprint();
        });
	});
</script>
